import axios from "axios"
import base from "@/api/path";
export interface Role{
  id?:string
  name:string
  code:string
  sort:number
  status:number
}
const api={
  getfinish(){
    return axios.get(base.baseUrl + base.getfinish)
  },
  postRoles(data:Role){
    return axios.post(base.baseUrl + base.postUrl,data)
  },
  putRoles(data:Role){
    return axios.put(base.baseUrl + base.putUrl,JSON.stringify(data))
  },
  deleteRoles(){
    return axios.delete(base.baseUrl + base.deleteUrl)
  },
  patchRoles(){
    return axios.patch(base.baseUrl + base.patchUrl)
  }
}
export default api
